package com.wsx.rpc.zipkin.controller;

import com.wsx.rpc.zipkin.service.FeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wangshuaixin
 * @Title: com.wsx.rpc.zipkin.controller.ConsumerController
 * @Description: TODO
 * @date 2018/11/06
 */
@RestController
public class ConsumerController {

    @Autowired
    private FeignService feignService;

    @RequestMapping(
            value = "/feign/{name}",
            method = {RequestMethod.GET}
    )
    public String feign(@PathVariable("name") String name) {
        return feignService.say(name);
    }
}
